package net.vinote.smart.platform.service.handler;

import net.vinote.smart.platform.module.database.bo.BizObject;
import net.vinote.smart.platform.service.dw.handler.CommonHandler;

@Deprecated
public class DwEditInfoHandler extends CommonHandler
{
    @Override
    public void initDisplayForEdit(BizObject bo)
    {
        setReadOnly("DONO", true);
    }
    
    @Override
    protected boolean validityCheck(BizObject bo, boolean isInsert)
    {
        String doNo = bo.getAttribute("DoNo");
        if (doNo == null || "".equals(doNo))
        {
            this.error = "模板编号未指定;";
        }
        
        String doName = bo.getAttribute("DoName");
        if (doName == null || "".equals(doName.trim()))
        {
            this.error += "模板名称不能为空;";
        }
        
        String mainTable=bo.getAttribute("MainTable");
        if(mainTable==null||"".equals(mainTable)){
            this.error+="未指定主表;";
        }
        return error.length() == 0;
    }
}
